/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package seso;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

/**
 *
 * @author Administrator
 */
@Entity
@Table(name = "ETCOH", catalog = "M3ERP", schema = "dbo")
@NamedQueries({
    @NamedQuery(name = "Etcoh.findAll", query = "SELECT e FROM Etcoh e"),
    @NamedQuery(name = "Etcoh.findByTransactionNo", query = "SELECT e FROM Etcoh e WHERE e.transactionNo = :transactionNo"),
    @NamedQuery(name = "Etcoh.findBySeason", query = "SELECT e FROM Etcoh e WHERE e.season = :season"),
    @NamedQuery(name = "Etcoh.findByWeeklyOrFinal", query = "SELECT e FROM Etcoh e WHERE e.weeklyOrFinal = :weeklyOrFinal"),
    @NamedQuery(name = "Etcoh.findByStatus", query = "SELECT e FROM Etcoh e WHERE e.status = :status"),
    @NamedQuery(name = "Etcoh.findByDescription", query = "SELECT e FROM Etcoh e WHERE e.description = :description"),
    @NamedQuery(name = "Etcoh.findByCreateBy", query = "SELECT e FROM Etcoh e WHERE e.createBy = :createBy"),
    @NamedQuery(name = "Etcoh.findByCreateDate", query = "SELECT e FROM Etcoh e WHERE e.createDate = :createDate"),
    @NamedQuery(name = "Etcoh.findByFilePath", query = "SELECT e FROM Etcoh e WHERE e.filePath = :filePath"),
    @NamedQuery(name = "Etcoh.findByQuantity", query = "SELECT e FROM Etcoh e WHERE e.quantity = :quantity")})
public class Etcoh implements Serializable {
    @Transient
    private PropertyChangeSupport changeSupport = new PropertyChangeSupport(this);
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "TransactionNo")
    private String transactionNo;
    @Column(name = "Season")
    private String season;
    @Column(name = "WeeklyOrFinal")
    private String weeklyOrFinal;
    @Column(name = "Status")
    private String status;
    @Column(name = "Description")
    private String description;
    @Column(name = "CreateBy")
    private String createBy;
    @Column(name = "CreateDate")
    @Temporal(TemporalType.DATE)
    private Date createDate;
    @Column(name = "FilePath")
    private String filePath;
    @Column(name = "Quantity")
    private Integer quantity;

    public Etcoh() {
    }

    public Etcoh(String transactionNo) {
        this.transactionNo = transactionNo;
    }

    public String getTransactionNo() {
        return transactionNo;
    }

    public void setTransactionNo(String transactionNo) {
        String oldTransactionNo = this.transactionNo;
        this.transactionNo = transactionNo;
        changeSupport.firePropertyChange("transactionNo", oldTransactionNo, transactionNo);
    }

    public String getSeason() {
        return season;
    }

    public void setSeason(String season) {
        String oldSeason = this.season;
        this.season = season;
        changeSupport.firePropertyChange("season", oldSeason, season);
    }

    public String getWeeklyOrFinal() {
        return weeklyOrFinal;
    }

    public void setWeeklyOrFinal(String weeklyOrFinal) {
        String oldWeeklyOrFinal = this.weeklyOrFinal;
        this.weeklyOrFinal = weeklyOrFinal;
        changeSupport.firePropertyChange("weeklyOrFinal", oldWeeklyOrFinal, weeklyOrFinal);
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        String oldStatus = this.status;
        this.status = status;
        changeSupport.firePropertyChange("status", oldStatus, status);
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        String oldDescription = this.description;
        this.description = description;
        changeSupport.firePropertyChange("description", oldDescription, description);
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        String oldCreateBy = this.createBy;
        this.createBy = createBy;
        changeSupport.firePropertyChange("createBy", oldCreateBy, createBy);
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        Date oldCreateDate = this.createDate;
        this.createDate = createDate;
        changeSupport.firePropertyChange("createDate", oldCreateDate, createDate);
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        String oldFilePath = this.filePath;
        this.filePath = filePath;
        changeSupport.firePropertyChange("filePath", oldFilePath, filePath);
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        Integer oldQuantity = this.quantity;
        this.quantity = quantity;
        changeSupport.firePropertyChange("quantity", oldQuantity, quantity);
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (transactionNo != null ? transactionNo.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Etcoh)) {
            return false;
        }
        Etcoh other = (Etcoh) object;
        if ((this.transactionNo == null && other.transactionNo != null) || (this.transactionNo != null && !this.transactionNo.equals(other.transactionNo))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "seso.Etcoh[ transactionNo=" + transactionNo + " ]";
    }

    public void addPropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.addPropertyChangeListener(listener);
    }

    public void removePropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.removePropertyChangeListener(listener);
    }
    
}
